<?php


namespace app\api\validate;


use think\Validate;

class PartnerValidate extends Validate
{

    protected $rule =   [
        'partner_id'    => 'require|number',
        'real_name'     => 'require|chs',
        'mobile'        => 'require|mobile',
        'region'        => 'require',
    ];

    protected $message  =   [
        'partner_id.require'    => '合伙人ID不能为空',
        'partner_id.number'     => '合伙人ID必须为数字',
        'real_name.number'      => '姓名不能为空',
        'real_name.chs'         => '姓名必须是汉字',
        'mobile.require'        => '手机号不能为空',
        'mobile.mobile'         => '手机号码不正确',
        'region.require'        => '区域不能为空',
    ];

    protected $scene = [
        'info'     => ['partner_id','real_name','mobile','region'],
    ];

}